package com.newbingo.entity;

import javax.persistence.AttributeOverride;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import org.springframework.web.servlet.tags.EscapeBodyTag;
@Entity
@AttributeOverride(name="memberUno",column=@Column(name="uno"))
public class Member extends User{
	private Agent agent;
	private Account account;
	private Integer minBet;
	private Integer maxBet;
	private Integer prizeAmount;//输赢总额
	private boolean isOnline;//是否在线
	private Integer loginAmount;//登录次数
	

	
	@ManyToOne(cascade=CascadeType.MERGE,fetch=FetchType.EAGER,targetEntity=Agent.class)
	public Agent getAgent() {
		return agent;
	}
	public void setAgent(Agent agent) {
		this.agent = agent;
	}
	
	@Embedded
	public Account getAccount() {
		return account;
	}
	public void setAccount(Account account) {
		this.account = account;
	}
	
	public Integer getMinBet() {
		return minBet;
	}
	public void setMinBet(Integer minBet) {
		this.minBet = minBet;
	}
	public Integer getMaxBet() {
		return maxBet;
	}
	
	public void setMaxBet(Integer maxBet) {
		this.maxBet = maxBet;
	}
	public Integer getPrizeAmount() {
		return prizeAmount;
	}
	public void setPrizeAmount(Integer prizeAmount) {
		this.prizeAmount = prizeAmount;
	}
	@Column(name="isOnline",columnDefinition="boolean default false")
	public boolean isOnline() {
		return isOnline;
	}
	
	public void setOnline(boolean isOnline) {
		this.isOnline = isOnline;
	}
	public Integer getLoginAmount() {
		return loginAmount;
	}
	public void setLoginAmount(Integer loginAmount) {
		this.loginAmount = loginAmount;
	}
	
}
